import request from '@/utils/request'

// 部门列表
export const getDepartments = () => request.get('/company/department')

// 部门负责人
export const getDepartmentsSimple = () => request.get('/sys/user/simple')

// 部门详情
export const getDepartmentsDetail = (id) => request.get(`/company/department/${id}`)

// 编辑部门
export const editDepartments = data => request.put(`/company/department/${data.id}`, data)

// 新增子部门
export const addDepartments = (data) => request.post('/company/department', data)

// 删除部门
export const delDepartments = (id) => request.delete(`/company/department/${id}`)
